//package com.lw.common.license;
//
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.boot.ApplicationArguments;
//import org.springframework.boot.ApplicationRunner;
//import org.springframework.stereotype.Component;
//
//@Component
//public class LicenseCheckRunner implements ApplicationRunner {
//    private final Logger log = LoggerFactory.getLogger(ApplicationRunner.class);
//    /**
//     * 证书subject
//     */
//    @Value("${license.subject}")
//    private String subject;
//
//    /**
//     * 公钥别称
//     */
//    @Value("${license.publicAlias}")
//    private String publicAlias;
//
//    /**
//     * 访问公钥库的密码
//     */
//    @Value("${license.storePass}")
//    private String storePass;
//
//    @Override
//    public void run(ApplicationArguments args) throws Exception {
//        log.info("++++++++ 开始安装证书 ++++++++");
//        LicenseVerifyParam param = new LicenseVerifyParam();
//        param.setSubject(subject);
//        param.setPublicAlias(publicAlias);
//        param.setStorePass(storePass);
//        // 相对路径resources资源目录
//        LicenseVerify licenseVerify = new LicenseVerify();
//        licenseVerify.install(param);
//        log.info("++++++++ 证书安装结束 ++++++++");
//    }
//}
